package ModelLayer;



import static org.junit.Assert.*;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;

/**
 * The test class CopyTest.
 *
 * @author  (your name)
 * @version (a version number or a date)
 */
public class CopyTest
{
    private ModelLayer.Copy copy1;

    /**
     * Default constructor for test class CopyTest
     */
    public CopyTest()
    {
    }

    /**
     * Sets up the test fixture.
     *
     * Called before every test case method.
     */
    @Before
    public void setUp()
    {
        copy1 = new ModelLayer.Copy("11", "12-12-2011", 150);
    }

    /**
     * Tears down the test fixture.
     *
     * Called after every test case method.
     */
    @After
    public void tearDown()
    {
    }

    @Test
    public void testCreateCopy()
    {
        ModelLayer.Copy copy1 = new ModelLayer.Copy("11", "12-12-2011", 150);
    }

    @Test
    public void testGetSerialNumber()
    {
        assertEquals("11", copy1.getSerialNumber());
    }

    @Test
    public void testSetSerialNumber()
    {
        copy1.setSerialNumber("12");
    }

    @Test
    public void testSetPurchaseDate()
    {
        copy1.setPurchaseDate("14-12-2011");
    }

    @Test
    public void testSetPurchasePrice()
    {
        copy1.setPurchasePrice(200);
    }

    @Test
    public void testGetPurchasePrice()
    {
        assertEquals(150, copy1.getPurchasePrice(), 0.1);
    }

    @Test
    public void printInfo()
    {
        copy1.printInfo();
    }
}







